 <#assign pageUrl="${query_context}" >
    <div class="multipages"> 
      <span class="fl"> ${page.totalCount} items found. </span> 
     <span class="fr">
    <#if totalPages?number gt 1>
	<#if (page.pageNo?number) gt 1>
		<a href="${pageUrl}${((page.pageNo?number-1) gt 0)?string(page.pageNo?number-1,page.pageNo?number)}/${parameter!''}">&#171; Prev</a>
	</#if>
	<#if page.pageNo?number == 1>
		<span class="current">1</span> 
	<#else>
		<a href="${pageUrl}1/${parameter!''}">1</a>&nbsp;
	</#if>
	<#if totalPages?number gt 0>
		<#if page.pageNo?number lt 10>
			<#if page.pageNo?number gte 2>
			<#list 2..page.pageNo?number as i>
				<#if page.pageNo?number==i>
				<span class="current">${i}</span> 
				<#else>
					<a href="${pageUrl}${i}/${parameter!''}">${i}</a>&nbsp;  
				</#if>
			</#list>
			</#if>
		<#else>
			  ...&nbsp;  
			  <#list page.pageNo?number-4..page.pageNo?number as i>
				<#if page.pageNo?number==i>
				<span class="current">${i}</span> 
				<!--
					<a class="cur_a" href="${pageUrl}?pageNo=${i}&">${i}</a>&nbsp;
					-->
				<#else>
					<a href="${pageUrl}${i}/${parameter!''}">${i}</a>&nbsp;  
				</#if>
			  </#list>
		</#if>
		<#if page.pageNo?number gte totalPages?number-4 || totalPages?number-4 lte 0>
			<#if page.pageNo?number+1 lte totalPages?number>
			<#list page.pageNo?number+1..totalPages?number as i>
				<a href="${pageUrl}${i}/${parameter!''}">${i}</a>&nbsp;  
				<#if page.pageNo?number == i>
				   <span class="current">${i}</span> 
				</#if>
			</#list>
			</#if>
		<#else>
			<#list page.nextPage..page.pageNo?number+4 as i>
				<#if page.pageNo?number == i>
				  <span class="current">${i}</span> 
				<#else>
					<a href="${pageUrl}${i}/${parameter!''}">${i}</a>&nbsp;  
				</#if>
			</#list>
			  ...&nbsp;  
			  <a href="${pageUrl}${totalPages}/${parameter!''}">${totalPages}</a>&nbsp;  
		</#if>
		<#if page.pageNo?number lt totalPages?number>
			<a href="${pageUrl}${((page.nextPage) lt totalPages?number)?string(page.nextPage,totalPages?number)}/${parameter!''}">Next &raquo;</a>
		</#if>
	</#if>
</#if>
</span>
</div>